<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:c="http://java.sun.com/jsf/composite/componentes">
    
    <h:form id="formEditarMinistracao" styleClass="form-estilo" prependId="false" rendered="#{listarMembro.autorizar('PAPEL_EDITAR_MINISTRACAO')}">
        <h2>Editar Ministração</h2>
        <fieldset>
            <legend>Detalhes</legend>
            <h:commandButton styleClass="commandButton" value="#{i18n.botao_voltar}" onclick="painelEditarMinistracao.hide();return false;"/>
            <h:commandButton styleClass="commandButton" action="#{editarMinistracao.salvar}" value="#{i18n.botao_salvar}"/>
            <br/><br/>
            <h:panelGrid columns="3">
                <h:outputLabel value="#{i18n.ministracao_musica}"/>
                <h:inputText id="nomeMusica" value="#{editarMinistracao.objeto.musica.nome}" size="50"/>
                <h:outputLink title="clique aqui para consultar" value="javascript:void(0)" onclick="dialogoConsultarMusica.show()">
                    <h:graphicImage value="#{resource['img:consultar.png']}" style="border: 0px;"/>
                </h:outputLink>
                <h:outputLabel value="#{i18n.ministracao_sequencia}"/>
                <h:inputText id="sequenciaMusica" value="#{editarMinistracao.objeto.sequencia}" size="10"/>
                <h:column/>
            </h:panelGrid>

        </fieldset>
    </h:form>

    <p:dialog onCloseUpdate="nomeMusica" 
              widgetVar="dialogoConsultarMusica"
              header="Consultar Música"
              fixedCenter="true"
              effect="FADE"
              width="600px"
              height="300px">
        <ui:include id="consultarMusica" src="/musica/consultar.xhtml">
            <ui:param name="alvo" value="#{editarMinistracao.objeto.musica}"/>
        </ui:include>
    </p:dialog>

</ui:composition>